\(\int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx\) [2438]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 14, antiderivative size = 57 \[ \int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx=-\frac {\sqrt {1+x+x^2}}{2 x^2}+\frac {3 \sqrt {1+x+x^2}}{4 x}+\frac {1}{8} \text {arctanh}\left (\frac {2+x}{2 \sqrt {1+x+x^2}}\right ) \]

[Out]

1/8*arctanh(1/2*(2+x)/(x^2+x+1)^(1/2))-1/2*(x^2+x+1)^(1/2)/x^2+3/4*(x^2+x+1)^(1/2)/x

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {758, 820, 738, 212} \[ \int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx=\frac {1}{8} \text {arctanh}\left (\frac {x+2}{2 \sqrt {x^2+x+1}}\right )+\frac {3 \sqrt {x^2+x+1}}{4 x}-\frac {\sqrt {x^2+x+1}}{2 x^2} \]

[In]

Int[1/(x^3*Sqrt[1 + x + x^2]),x]

[Out]

-1/2*Sqrt[1 + x + x^2]/x^2 + (3*Sqrt[1 + x + x^2])/(4*x) + ArcTanh[(2 + x)/(2*Sqrt[1 + x + x^2])]/8

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 738

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 758

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*(d + e*x)^(m + 1)*
((a + b*x + c*x^2)^(p + 1)/((m + 1)*(c*d^2 - b*d*e + a*e^2))), x] + Dist[1/((m + 1)*(c*d^2 - b*d*e + a*e^2)),
Int[(d + e*x)^(m + 1)*Simp[c*d*(m + 1) - b*e*(m + p + 2) - c*e*(m + 2*p + 3)*x, x]*(a + b*x + c*x^2)^p, x], x]
 /; FreeQ[{a, b, c, d, e, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e
, 0] && NeQ[m, -1] && ((LtQ[m, -1] && IntQuadraticQ[a, b, c, d, e, m, p, x]) || (SumSimplerQ[m, 1] && IntegerQ
[p]) || ILtQ[Simplify[m + 2*p + 3], 0])

Rule 820

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Sim
p[(-(e*f - d*g))*(d + e*x)^(m + 1)*((a + b*x + c*x^2)^(p + 1)/(2*(p + 1)*(c*d^2 - b*d*e + a*e^2))), x] - Dist[
(b*(e*f + d*g) - 2*(c*d*f + a*e*g))/(2*(c*d^2 - b*d*e + a*e^2)), Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x]
, x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && EqQ[S
implify[m + 2*p + 3], 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\sqrt {1+x+x^2}}{2 x^2}-\frac {1}{2} \int \frac {\frac {3}{2}+x}{x^2 \sqrt {1+x+x^2}} \, dx \\ & = -\frac {\sqrt {1+x+x^2}}{2 x^2}+\frac {3 \sqrt {1+x+x^2}}{4 x}-\frac {1}{8} \int \frac {1}{x \sqrt {1+x+x^2}} \, dx \\ & = -\frac {\sqrt {1+x+x^2}}{2 x^2}+\frac {3 \sqrt {1+x+x^2}}{4 x}+\frac {1}{4} \text {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {2+x}{\sqrt {1+x+x^2}}\right ) \\ & = -\frac {\sqrt {1+x+x^2}}{2 x^2}+\frac {3 \sqrt {1+x+x^2}}{4 x}+\frac {1}{8} \tanh ^{-1}\left (\frac {2+x}{2 \sqrt {1+x+x^2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.74 \[ \int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx=\frac {(-2+3 x) \sqrt {1+x+x^2}}{4 x^2}-\frac {1}{4} \text {arctanh}\left (x-\sqrt {1+x+x^2}\right ) \]

[In]

Integrate[1/(x^3*Sqrt[1 + x + x^2]),x]

[Out]

((-2 + 3*x)*Sqrt[1 + x + x^2])/(4*x^2) - ArcTanh[x - Sqrt[1 + x + x^2]]/4

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.74

method result size
trager \(\frac {\left (-2+3 x \right ) \sqrt {x^{2}+x +1}}{4 x^{2}}-\frac {\ln \left (\frac {-2-x +2 \sqrt {x^{2}+x +1}}{x}\right )}{8}\) \(42\)
risch \(\frac {3 x^{3}+x^{2}+x -2}{4 x^{2} \sqrt {x^{2}+x +1}}+\frac {\operatorname {arctanh}\left (\frac {2+x}{2 \sqrt {x^{2}+x +1}}\right )}{8}\) \(42\)
default \(\frac {\operatorname {arctanh}\left (\frac {2+x}{2 \sqrt {x^{2}+x +1}}\right )}{8}-\frac {\sqrt {x^{2}+x +1}}{2 x^{2}}+\frac {3 \sqrt {x^{2}+x +1}}{4 x}\) \(44\)

[In]

int(1/x^3/(x^2+x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/4*(-2+3*x)/x^2*(x^2+x+1)^(1/2)-1/8*ln((-2-x+2*(x^2+x+1)^(1/2))/x)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.11 \[ \int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx=\frac {x^{2} \log \left (-x + \sqrt {x^{2} + x + 1} + 1\right ) - x^{2} \log \left (-x + \sqrt {x^{2} + x + 1} - 1\right ) + 6 \, x^{2} + 2 \, \sqrt {x^{2} + x + 1} {\left (3 \, x - 2\right )}}{8 \, x^{2}} \]

[In]

integrate(1/x^3/(x^2+x+1)^(1/2),x, algorithm="fricas")

[Out]

1/8*(x^2*log(-x + sqrt(x^2 + x + 1) + 1) - x^2*log(-x + sqrt(x^2 + x + 1) - 1) + 6*x^2 + 2*sqrt(x^2 + x + 1)*(
3*x - 2))/x^2

Sympy [F]

\[ \int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx=\int \frac {1}{x^{3} \sqrt {x^{2} + x + 1}}\, dx \]

[In]

integrate(1/x**3/(x**2+x+1)**(1/2),x)

[Out]

Integral(1/(x**3*sqrt(x**2 + x + 1)), x)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.88 \[ \int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx=\frac {3 \, \sqrt {x^{2} + x + 1}}{4 \, x} - \frac {\sqrt {x^{2} + x + 1}}{2 \, x^{2}} + \frac {1}{8} \, \operatorname {arsinh}\left (\frac {\sqrt {3} x}{3 \, {\left | x \right |}} + \frac {2 \, \sqrt {3}}{3 \, {\left | x \right |}}\right ) \]

[In]

integrate(1/x^3/(x^2+x+1)^(1/2),x, algorithm="maxima")

[Out]

3/4*sqrt(x^2 + x + 1)/x - 1/2*sqrt(x^2 + x + 1)/x^2 + 1/8*arcsinh(1/3*sqrt(3)*x/abs(x) + 2/3*sqrt(3)/abs(x))

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.47 \[ \int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx=\frac {{\left (x - \sqrt {x^{2} + x + 1}\right )}^{3} + 9 \, x - 9 \, \sqrt {x^{2} + x + 1} + 8}{4 \, {\left ({\left (x - \sqrt {x^{2} + x + 1}\right )}^{2} - 1\right )}^{2}} + \frac {1}{8} \, \log \left ({\left | -x + \sqrt {x^{2} + x + 1} + 1 \right |}\right ) - \frac {1}{8} \, \log \left ({\left | -x + \sqrt {x^{2} + x + 1} - 1 \right |}\right ) \]

[In]

integrate(1/x^3/(x^2+x+1)^(1/2),x, algorithm="giac")

[Out]

1/4*((x - sqrt(x^2 + x + 1))^3 + 9*x - 9*sqrt(x^2 + x + 1) + 8)/((x - sqrt(x^2 + x + 1))^2 - 1)^2 + 1/8*log(ab
s(-x + sqrt(x^2 + x + 1) + 1)) - 1/8*log(abs(-x + sqrt(x^2 + x + 1) - 1))

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{x^3 \sqrt {1+x+x^2}} \, dx=\int \frac {1}{x^3\,\sqrt {x^2+x+1}} \,d x \]

[In]

int(1/(x^3*(x + x^2 + 1)^(1/2)),x)

[Out]

int(1/(x^3*(x + x^2 + 1)^(1/2)), x)